package com.itheima.Demo1;

public class Test {
    public static void main(String[] args) {
        Dog dog = new Dog("大黄",5);
        Cat cat = new Cat("花花",2);
        /*dog.setName("大黄");
        dog.setAge(5);
        cat.setName("花花");
        cat.setAge(2);*/
        System.out.println("这只猫的名字叫:" + cat.getName() + "  " + "年龄:" + cat.getAge() + "岁");
        dog.withPeople();
        System.out.println("这只狗的名字叫:" + dog.getName() + "  " + "年龄:" + dog.getAge() + "岁");
        cat.withPeople();
    }
}
